package com.zhou.bpm.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @Author: zhoujinchuan
 * @Description: TODO（流程实例对象）
 * @CreateTime: 2023/10/25 9:21
 */
@Data
@TableName(value = "bpm_instance")
public class BpmInstance {
    private static final long serialVersionUID=1L;

    @ApiModelProperty("主键")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(type = IdType.AUTO, value = "id")
    private Integer id;

    @ApiModelProperty("流程编码")
    @TableField(value = "process_code")
    private String processCode;

    @ApiModelProperty("流程名称")
    @TableField(value = "process_name")
    private String processName;

    @ApiModelProperty("流实例名称")
    @TableField(value = "instance_name")
    private String instanceName;

    @ApiModelProperty("当前节点编码")
    @TableField(value = "current_node_code")
    private String currentNodeCode;

    @ApiModelProperty("当前节点名称")
    @TableField(value = "current_node_name")
    private String currentNodeName;

    @ApiModelProperty("发起人帐号")
    @TableField(value = "applier")
    private String applier;

    @ApiModelProperty("发起人姓名")
    @TableField(value = "applier_name")
    private String applierName;

    @ApiModelProperty("流程状态(1-申请人发起,2-审批中,3-已完成,4-已撤回,5-已作废)")
    @TableField(value = "status")
    private String status;

    @ApiModelProperty("实例发起时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("实例更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


}
